package com.earthchen.mattress.domain;

import java.util.Arrays;
import java.util.Date;

/**
 * 床垫数据
 *
 * @author: EarthChen
 * @date: 2018/04/24
 */
public class MattressData {

    /**
     * 设备唯一序列号
     */
    private String sn;

    /**
     * 固件版本
     */
    private Integer fv;

    /**
     * 体征状态枚举
     * <p>
     * on=在床,off=离床,mov=体动,call=呼叫
     */
    private String state;

    /**
     * 心跳频率
     */
    private Integer heartbeat;

    /**
     * 呼吸频率
     */
    private Integer breath;

    /**
     * 尿湿：true 0xc3为尿湿false0xc2 为非尿湿
     */
    private boolean wet;

    /**
     * 呼吸暂停次数24小时清零，3秒一次发送， 累加
     */
    private Integer odor;

    /**
     * 在床 离床的 辅助判断
     */
    private Integer weight;


    /**
     * 身体位置，例如[6,9]
     */
    private Integer[] position;

    /**
     * 时间
     */
    private Date createTime;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Integer getFv() {
        return fv;
    }

    public void setFv(Integer fv) {
        this.fv = fv;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Integer getHeartbeat() {
        return heartbeat;
    }

    public void setHeartbeat(Integer heartbeat) {
        this.heartbeat = heartbeat;
    }

    public Integer getBreath() {
        return breath;
    }

    public void setBreath(Integer breath) {
        this.breath = breath;
    }

    public boolean isWet() {
        return wet;
    }

    public void setWet(boolean wet) {
        this.wet = wet;
    }

    public Integer getOdor() {
        return odor;
    }

    public void setOdor(Integer odor) {
        this.odor = odor;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public Integer[] getPosition() {
        return position;
    }

    public void setPosition(Integer[] position) {
        this.position = position;
    }

    @Override
    public String toString() {
        return "MattressData{" +
                "sn='" + sn + '\'' +
                ", fv=" + fv +
                ", state='" + state + '\'' +
                ", heartbeat=" + heartbeat +
                ", breath=" + breath +
                ", wet=" + wet +
                ", odor=" + odor +
                ", weight=" + weight +
                ", position=" + Arrays.toString(position) +
                '}';
    }
}
